:root {
    --content-height: calc( 100vh - 50px );
    --banner-width:1200px;
    --shadow-common:rgba(255,255,255,0.9);
    --shadow-inverse: rgba(0,0,0,0.9);
}
body.dark-mode {
    --shadow-common: rgba(0,0,0,0.9);
    --shadow-inverse: rgba(255,255,255,0.9);
}
.mouse-cursor{
    user-select: none;
}
body{
    font-family: Arial, PingFangSC-Regular, Microsoft Yahei, "Source Han Serif SC", SimSun;
}
body.dark-mode .button-outline {
    border:1px solid var(--primary-color);
}
pre {
    width: 100%;
    overflow: scroll;
}
pre::-webkit-scrollbar{
    width: 8px;
    height: 8px;
    background-color: var(--background-color);
}
pre::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
}

.container-row-768-column{
    display: flex;
}
.container-banner {
    width: var(--banner-width);
}
.content-container {
    width: 100%;
    height: var(--content-height);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    
}

.header-container {
    position: sticky;
    top: 0;
    z-index: var(--z-index-level-3) ;
    justify-content: space-between;
}
.header-search {
    width: 300px;
}
@media  screen and (max-width: 768px) {
    .container-row-768-column{
        flex-direction: column;
        gap: 0.5rem;
    }
    .header-search {
        width: min-content;
    }
    .header-container .container {
        width: 100%;
        justify-content:space-around;
    }
    .scroll-container::-webkit-scrollbar{
        width: 0;
        height: 0;
    }
}

.home-container {
    display: flex;
    height: calc(100vh - 32px);
    margin: 0 auto;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-content: flex-start;
}
.book-card {
    width: 200px;
    height: min-content;
    margin: 1rem 1.2rem;
    border-top-left-radius: 1rem;
    border-top-right-radius: 1rem;
    background-color: transparent;
}
.book-meta h4, .book-meta h6 {
    width: calc(200px - 2rem);
}
.book-image {
    border-top-right-radius: 1rem;
    border-top-left-radius: 1rem;
}
.category-container{
    position: sticky;
    top: 0;

    width: var(--banner-width);
    height: min-content;
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--color-inverse);
    z-index: var(--z-index-level-1);
}
.category-item{
    padding: 0.4rem 0.6rem;
    margin: 0.5rem;
    border-radius: 0.5rem;
    white-space: nowrap;
    transition: background-color 0.3s,color 0.3s;
}
.category-item:hover{
    background-color: var(--primary-color);
    color: white;
}
.category-item.active{
    background-color: var(--primary-color);
    color: white;
}
.book-item-skeleton{
    width: 200px;
    height: 250px;
    margin: 1rem 1.2rem;
}
@media  screen and (max-width: 768px) {
    .home-container {
        justify-content: space-evenly;
    }
    .category-container{
        width: 100%;
        flex-wrap:nowrap;
    }
    .book-card {
        width: 150px;
        margin: 1rem 0;
    }
    .book-meta h4, .book-meta h6 {
        width: calc(150px - 2rem);
    }
    .book-item-skeleton{
        width: 150px;
        height: 200px;
    }
}
@media  screen and (max-width: 1200px) {
    .container-banner {
        width: 100%;
    }
}

.login-container{
    display: flex;
    margin: 0 auto;
    flex-direction: column;
    gap: 0.7rem;
    padding: 1rem;
    max-width: 400px;
}
.login-captcha-container{
    display: flex;
    gap: 0.2rem;
    align-items:end;
}
@media screen and (max-width: 768px){
    .login-container{
        max-width: unset;
    }
    
}
.book-info-container {
    max-width: 1100px;
    display: flex;
    gap:2rem;
    margin: 0 auto;
    margin-top: 3rem;
}
.book-info-container-center {
    max-width: 750px;
    display: flex;
    padding: 2rem 1rem;
    border-radius: 1rem;
    gap:1rem;

    overflow: hidden;
}
.book-info-container-center .book-info-meta {

    max-width: 500px;
    width: 500px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap:0.5rem;
}
.book-info-container-center .book-info-meta .book-info-meta-category{
    width: fit-content;
    background-color: #DBEAFE;
    padding: 0.2rem 0.5rem;
    border-radius: 0.5rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: #515455;
}
.book-info-container .tab-item{
    flex: 1;
    text-align: center;
}
.book-info-catalog{
    max-height: 280px;
}
.book-info-catalog-item{
    padding: 1rem 2rem;
}
.book-info-fast-catalog {
    max-width: 320px;
    width: 320px;
    padding: 1rem 0 1rem 1.5rem ;
    margin-bottom: 2rem;
}
.book-info-fast-catalog .text-primary{
    margin-right: 1.5rem;
}
.book-info-fast-catalog-item {
    margin: 0.5rem 0;
}
.book-info-description{
    padding: 0.2rem 1rem;
    min-height: 150px;
}
.book-info-fast-catalog-list {
    max-height: 300px;
}
.book-info-tag{
    font-size: 0.6rem;
    padding: 0.2rem 0.6rem;
    border-radius: 0.5rem;
    color: #f3eded;
    background-color: #6caaed;
}
.book-info-recommend-item-meta{
    display: flex;
    width: calc( 320px - 72px - 1.5rem );
    height: 96px;
    flex-direction: column;
    padding-right: 1.5rem;
    padding-top: 0;
    padding-left: 0.5rem;
    margin-bottom: 1rem;

}
@media screen and (max-width: 768px){
    .book-info-container-center {
        max-width: unset;
        padding: 1rem 0.5rem;
    }
    .book-info-container {
        max-width: unset;
        width: 100%;
    }
   .book-info-container-center .book-info-meta {
        flex: 1;
   }
   .book-info-catalog-item {
       padding: 0.5rem 1rem;
   }
   .book-info-description {
       min-height: unset;
   }
   .book-info-fast-catalog {
    max-width: unset;
    width: 100%;
   }
   .book-info-recommend-item-meta{
    width: calc( 100% - 72px - 1.5rem );
   }
}

.book-read-container{
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1rem 1rem 1rem;
    display: flex;
    justify-content: center;
}
.book-read-content {
    max-width: 700px;
}
.book-read-sidebar{
    position: fixed;
    top: 50%;
    left:calc( 50vw + 450px );
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.book-read-sidebar-item {
    padding: 0.25rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    cursor: pointer;
    user-select: none;
}
.book-read-sidebar-item:hover {
    color: var(--primary-color);
}
.book-read-catalog-container {
    min-width: 480px;
    padding: 0.5rem 1rem;
    padding-top: 2.5rem;
}
.book-read-catalog{
    margin-top: 1rem;
    max-height: calc( 100vh - 6.8rem);
}
.book-read-catalog-item {
    padding: 0.5rem 0;
}
.active-primary {
    color: var(--background-color);
    background-color: var(--color-inverse);
}
@media  screen and (max-width: 768px){

    .book-read-container{
        max-width: unset;
        width: 100%;
    }
    .book-read-content {
        max-width: unset;
        width: 100%;
    }
    .book-read-catalog-container{
        min-width: unset;
        max-width: 70vw;
    }
}

.reading-history-container {
    max-width: calc( 1200px + 2rem );
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    gap: 1rem;
}
.reading-history-item {
    position: relative;
    width: 400px;
    display: flex;
    padding: 1rem 1rem;
    gap:1rem;
    border-radius: 1rem;
}
.reading-history-item-content{
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.reading-history-item-content h3 {
    max-width: calc( 400px - 96px - 3rem );
}
.reading-history-progressbar{
    width: calc( 400px - 96px - 3rem - 4rem );
    height: calc( 0.5rem );
}
.inner-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
}
.show-768{
    display: none;
}
.delete-768{
    color: white;
    background-color: red;
}
.loading {
    height:80vh;
}
@media screen and (max-width: 768px){
    .show-768{
        display: flex;
    }
    .reading-history-container{
        max-width: unset;
        width: 100vw;
    }
    .reading-history-item{
        max-width: unset;
        width: 100vw;
    }
    .reading-history-item-content h3 {
        max-width: calc( 100vw - 96px - 3rem );
    }
    .reading-history-progressbar{
        width: calc( 100vw - 96px - 8rem );
        height: calc( 0.5rem );
    }
}

.personal-center-container{
    max-width: 1200px;
    margin: 0 auto;
    margin-top: 1rem;
    display: flex;
    justify-content: space-between;
}
.personal-center-left{
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.personal-center-left-top{
    width: 300px;
    padding: 1rem;
    border-radius: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap:1rem;
}
.personal-center-right {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.personal-center-user-favorite{
    font-size: 0.8rem;
    padding: 0.4rem 0.6rem;
    border-radius: 0.5rem;
    color: #515455;
    background-color: #E0E7EF
}
.personal-center-right-top{
    width: 850px;
    padding: 1rem;
    border-radius: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}
.personal-center-current-read {
    width: 100%;
    display: flex;
    padding: 1rem 1rem;
    gap:1rem;
    border-radius: 1rem;
}
.personal-center-current-read-content{
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 0.5rem;
}
.personal-center-current-read-content h4 {
    max-width: calc( 850px - 64px - 3rem );
}
.personal-center-current-read-progressbar {
    width: 100%;
    height:0.5rem;
}
.personal-goals-item {
    flex: 1;
}
.personal-center-goal-progressbar{
    height: 0.5rem;
}
.line-gradient-purple{
    background: linear-gradient(to right,#6366f1,#9333ea);
}
.line-gradient-green {
    background: linear-gradient(to right,#22c55e,#059669);
}
.exit-button {
    color: white;
    border: none;
    outline: none;
    background-color: red;
}
.exit-button:hover{
    background-color: rgba(255,0,0, 0.7);
}
@media screen and (max-width: 768px){
    .personal-center-left-top{
        width: 100vw;
        max-width: unset;

    }
    .personal-center-right-top{
        width: 100vw;
        max-width: unset;
    }
    .personal-center-current-read-content h4{
        max-width: calc( 100vw - 64px - 5rem );
    }
}